﻿using System.Diagnostics;
using Microsoft.SharePoint;

namespace ServBus.ListForm2010.Utility
{
    public class ErrorLog
    {
        public static void Write(string message, EventLogEntryType eventType)
        {
            try
            {
                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    EventLog log = new EventLog();
                    log.Source = "ListForm";
                    log.WriteEntry(message, eventType);
                });
            }
            catch
            { }
        }
    }
}
